﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlackBird.Models
{
	public enum SupportTypes
	{
		BiJiaDan,	//比价单
		Income,		//收入
		Expend,		//支出
		Event,			//事件
		ExamplContract,  //范例合同
		ProjectContract, //项目合同
        FukuanDan, //付款单
	}

	public enum SupportTypeStatus
	{
		CaoGao,				//草稿
		ShengHeZhong,		//审核中
		ShenHeWanCheng,		//审核完成
		GuiDang,			//归档
		ZuoFei,				//作废
		Cancel,				//取消 如果没有Cancel，而直接删掉表，会引起编号重复
		JiHua,				//对收入，支出，事件的计划  
	}

	public enum ShenHeResult
	{
		//待定
		Undetermined,
		//打回，重新修改
		Fail,
		//通过，结束
		Pass,

		//作废
		ZuoFei,
	}

	/// <summary>
	/// 操作功能
	/// </summary>
	public enum BBAction
	{
		Create,		//创建比价单收入单支出单

		ShenHe,		//审核
	}


	public static class ExtendMethod
	{
		public static string PropertyToString(this SupportTypes sp)
		{
			switch (sp)
			{
				case SupportTypes.BiJiaDan:
					return "比价单";
				case SupportTypes.Income:
					return "收入单";					
				case SupportTypes.Expend:
					return "支出单";	
				case SupportTypes.Event:
					return "事件";
                case SupportTypes.FukuanDan:
                    return "付款单";
			}

			throw new Exception("Not Implemented Yet");
		}

		public static string PropertyToString(this SupportTypeStatus sps)
		{
			switch (sps)
			{
                case SupportTypeStatus.CaoGao:
                    return "草稿";
                case SupportTypeStatus.ShengHeZhong:
                    return "审核中";
                case SupportTypeStatus.ShenHeWanCheng:
                    return "审核完成";
                case SupportTypeStatus.GuiDang:
                    return "归档";
				case SupportTypeStatus.ZuoFei:
					return "作废";
				case SupportTypeStatus.JiHua:
					return "计划";
                
            }

			throw new Exception("Not Implemented Yet");
		}
	}

}